package com.snfdf.camunda.gateway;

import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Component;

import java.util.Optional;

@Slf4j
@Component("checkVideoFormat")
public class CheckVideoFormatService implements JavaDelegate {

    @Override
    public void execute(DelegateExecution execution) {
        log.info("进入检测视频格式任务");
        // String videoName = Optional.ofNullable(execution.getVariable("videoName")).map(Object::toString).orElse("");
        String videoName = Optional.ofNullable(execution.getVariable("targetVideoName")).map(Object::toString).orElse("");
        log.info("视频名称：{}", videoName);
    }
}
